using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using Ras2ClassLib.Common.Data;

namespace Ras2ClassLib
{
	public class VinListDoc : BaseDocument
	{
		#region Public functions
		public VinListCollection GetAllVinList()
		{
			String strSQL = "select * from Listi";
			return base.LoadCollection<VinListCollection, VinList>(strSQL);
		}

		public VinList GetVinList(int nID)
		{
			String strSQL = String.Format("SELECT * FROM ListaFaersla INNER JOIN Lag ON ListaFaersla.LagID = Lag.LagID INNER JOIN Flytjandi ON Lag.FlytjandiID = Flytjandi.FlytjandiID WHERE ListaID={0}", nID);
			return base.LoadItem<VinList>(strSQL);
		}
		#endregion
	}
}
